﻿<catel:UserControl x:Class="Catel.Examples.WinRT.Advanced.Views.RoomView"
                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                   xmlns:catel="using:Catel.Windows.Controls" 
                   xmlns:catelconverters="using:Catel.Windows.Data.Converters" mc:Ignorable="d"
                   d:DesignHeight="300" d:DesignWidth="400">
    
    <UserControl.Resources>
        <catelconverters:FormattingConverter x:Key="FormattingConverter" />
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Image Grid.Row="0" Grid.Column="0" Source="/Resources/Images/room.png" Width="48" Height="48"/>

        <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Name}" VerticalAlignment="Center" />

        <TextBlock Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding ViewModelConstructionTime, Converter={StaticResource FormattingConverter}, ConverterParameter='ViewModel created at \{0:HH:mm:ss.fff\}'}" />
    </Grid>
    
</catel:UserControl>
